from django.contrib import admin

from hulin.models import Ranger,Manageuser,Managelogin,Supuser
from hulin.models import Mession,Event,Rjurnal
from hulin.models import Map,Group,Category,Mpoint
from hulin.models import Locus,Signin,Forest
from hulin.models import News,Alert
# Register your models here.

#护林员信息表
class RangerManager(admin.ModelAdmin):
    list_display = ['uid','name','sex','photo','start','years','status','phone','info','mid','num']
admin.site.register(Ranger,RangerManager)

#管理员信息
class ManageuserManager(admin.ModelAdmin):
    list_display = ['uid','name','manrange','info']
admin.site.register(Manageuser,ManageuserManager)

#管理员登录信息表
class ManageloginManager(admin.ModelAdmin):
    list_display = ['uid','password','token','mfile']
admin.site.register(Managelogin,ManageloginManager)

#超级管理员信息及登录
class SupuserManager(admin.ModelAdmin):
    list_display = ['uid','name','password','info','token']
admin.site.register(Supuser,SupuserManager)







#地图表
class MapManager(admin.ModelAdmin):
    list_display = ['id','name','title','img','size_w','size_h','layerurl','layers']
admin.site.register(Map,MapManager)

#大类表
class GroupManager(admin.ModelAdmin):
    list_display = ['id','name','title','mid']
admin.site.register(Group,GroupManager)

#小类表
class CategoryManager(admin.ModelAdmin):
    list_display = ['id','name','title','iconurl','shadowurl','cluster','status','gid']
admin.site.register(Category,CategoryManager)

#大类表
class MpointManager(admin.ModelAdmin):
    list_display = ['id','type','x','y','rid','name','gid']
admin.site.register(Mpoint,MpointManager)






#任务调度表
class MessionManager(admin.ModelAdmin):
    list_display = ['id','title','content','stime','ftime','x','y','mclass','status','mid','rid']
admin.site.register(Mession,MessionManager)

#事件表
class EventManager(admin.ModelAdmin):
    list_display = ['id','title','content','stime','ftime','x','y','handle','mclass','status','mid','rid']
admin.site.register(Event,EventManager)

#日志
class RjurnalManager(admin.ModelAdmin):
    list_display = ['id','rid','time','content']
admin.site.register(Rjurnal,RjurnalManager)









#护林员轨迹
class LocusManager(admin.ModelAdmin):
    list_display = ['uid','mfile']
admin.site.register(Locus,LocusManager)

#签到记录
class SigninManager(admin.ModelAdmin):
    list_display = ['uid','lfile']
admin.site.register(Signin,SigninManager)

#林区基础信息表
class ForestManager(admin.ModelAdmin):
    list_display = ['id','datee','weather','area']
admin.site.register(Forest,ForestManager)





#新闻表
class NewsManager(admin.ModelAdmin):
    list_display = ['id','title','content','time','editer']
admin.site.register(News,NewsManager)


#警情记录
class AlertManager(admin.ModelAdmin):
    list_display = ['id','aclass','content','time','afrom']
admin.site.register(Alert,AlertManager)



